package com.saozhu.command;

import java.util.HashMap;
import java.util.Map;

import com.saozhu.Mimpl.SystemDeleteOrderCommand;
import com.saozhu.Mimpl.SystemExitCommand;
import com.saozhu.Mimpl.SystemHelpCommand;
import com.saozhu.Mimpl.SystemLoginCommand;
import com.saozhu.Mimpl.SystemSignUpCommand;
import com.saozhu.command.AbstractCommandFactory;




public class SystemCommandFactory extends AbstractCommandFactory
{
	public static Map<CommandCode,Command> commandMap=new HashMap<>();
	static
	{
		commandMap.put(CommandCode.HELP, new SystemHelpCommand());
		commandMap.put(CommandCode.EXIT, new SystemExitCommand());
		commandMap.put(CommandCode.SIGNUP, new SystemSignUpCommand());
		commandMap.put(CommandCode.LOGIN, new SystemLoginCommand());
		commandMap.put(CommandCode.DELETEORDER, new SystemDeleteOrderCommand());
	}
	@Override
	public Command buildCommand(CommandCode commandcode) 
	{
		return commandMap.get(commandcode);
	}
	
}
